//
//  CLfootCell.m
//  I-want-go
//
//  Created by dllo on 15/10/24.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "CLfootCell.h"
#import "CLfoot.h"
#import "CLscreen.h"

@implementation CLfootCell


- (void)dealloc {
    [_thinkLabel release];
    [_talkLabel release];
    [_likeLabel release];
    [_leftImage release];
    [_nameLabel release];
    [_timeLabel release];
    [_bigImage release];
    [_describLabel release];
    [_myCollectionView release];
    [super dealloc];
    // classify 分类
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return  self;
}

- (void)createView {
    
    self.leftImage = [[UIImageView alloc] init];
    self.leftImage.backgroundColor = [UIColor blackColor];
    [self.contentView addSubview:self.leftImage];
    [_leftImage release];
    
    self.nameLabel = [[UILabel alloc] init];
    self.nameLabel.backgroundColor = [UIColor whiteColor];
    self.nameLabel.font = [UIFont systemFontOfSize:20];
    [self.contentView addSubview:self.nameLabel];
    [_nameLabel release];
    
    self.timeLabel = [[UILabel alloc] init];
    self.timeLabel.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.timeLabel];
    [_timeLabel release];
    
    
    self.bigImage = [[UIImageView alloc] init];
    self.bigImage.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.bigImage];
    [_bigImage release];
    
    self.describLabel = [[UILabel alloc] init];
    self.describLabel.backgroundColor = [UIColor whiteColor];
    self.describLabel.font = [UIFont systemFontOfSize:18];
    self.describLabel.numberOfLines = 0;
    [self.contentView addSubview:self.describLabel];
    [_describLabel release];
//    
//    UIButton *mybutton = [UIButton buttonWithType:UIButtonTypeSystem];
//
//    [self.contentView addSubview:mybutton];
//    [mybutton setTitle:@"关注" forState:UIControlStateNormal];
//    [mybutton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
//    mybutton.frame = CGRectMake(290 * SWIDTH, 5 * SHEIGHT, 75 * SWIDTH, 30 * SHEIGHT);
//    [mybutton addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
    
    self.thinkLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.thinkLabel];
    self.thinkLabel.textAlignment = NSTextAlignmentCenter;
    self.thinkLabel.userInteractionEnabled = YES;
    [_thinkLabel release];
    
    self.talkLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.talkLabel];
    [_talkLabel release];
    self.talkLabel.textAlignment = NSTextAlignmentCenter;
//    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(click:)];
//    [self.talkLabel addGestureRecognizer:tap];
//    
    self.likeLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.likeLabel];
    self.likeLabel.textAlignment = NSTextAlignmentCenter;
    [_likeLabel release];
    
    
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    self.leftImage.frame = CGRectMake(5 * SWIDTH, 5 * SHEIGHT, 40 * SWIDTH, 40 * SHEIGHT);
    
    self.nameLabel.frame = CGRectMake(50 * SWIDTH, 7 * SHEIGHT, 200 * SWIDTH, 25 * SHEIGHT);
    
    self.timeLabel.frame = CGRectMake(50 * SWIDTH, 30 * SHEIGHT, 150 * SWIDTH, 20 * SHEIGHT);
    
    self.bigImage.frame = CGRectMake(0, 50 * SHEIGHT, 375 * SWIDTH, 265 * SHEIGHT);
    
    self.describLabel.frame = CGRectMake(15 * SWIDTH, 320 * SHEIGHT, 345 * SWIDTH, 70 * SHEIGHT);
    
    self.thinkLabel.frame = CGRectMake(0, 390 * SHEIGHT, SWIDTH * 375 / 3, 20 * SHEIGHT);
    self.talkLabel.frame = CGRectMake(SWIDTH * 375 / 3, 390 * SHEIGHT,SWIDTH * 375 / 3, 20 * SHEIGHT);
    self.likeLabel.frame = CGRectMake(SWIDTH * 2 * 375 / 3, 390 * SHEIGHT, SWIDTH * 375 / 3, 20 * SHEIGHT);
}


//- (void)click:(UIButton *)button {
//    
//}

//- (void)clack:(uila *)la {
//    self.nameLabel.textColor = [UIColor redColor];
//}







- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
